import React, {Component} from 'react';
import {Router, hashHistory, Route, IndexRoute} from 'react-router';

import App from './route/App';
import {View as Home} from './route/App/Home';
import {View as Demo} from './route/App/Demo';
import {View as CounterPanel} from './route/App/CounterPanel';
import {View as About} from './route/App/About';
import {View as NotFound} from './route/NotFound';

export default class AppRouter extends Component {
    render() {
        const history = hashHistory;
        return (
            <Router history={history}>
                <Route path="/" component={App}>
                    <IndexRoute component={Home}/>
                    <Route path="/demo" component={Demo}/>
                    <Route path="/counter-panel" component={CounterPanel}/>
                    <Route path="/about" component={About}/>
                    {/* route 放这里 */}
                </Route>
                <Route path="*" component={NotFound}/>
            </Router>
        );
    }
}
			